﻿using System;
using System.Windows;
using System.Windows.Controls;

namespace MJD
{
    public partial class NotificationWindow : ChildWindow
    {
        public NotificationWindow(Exception e)
        {
            InitializeComponent();
            if (e != null)
            {
                NotificationTextBox.Text = e.Message;
            }
        }


        public NotificationWindow(Uri uri)
        {
            InitializeComponent();
            if (uri != null)
            {
                NotificationTextBox.Text = Recursos.Mensajes.PaginaNoEncontrada +" \"" + uri.ToString() + "\"";
            }
        }


        public NotificationWindow(string message)
        {
            InitializeComponent();
            NotificationTextBox.Text = message;
        }


        public NotificationWindow(string message, string details)
        {
            InitializeComponent();
            NotificationTextBox.Text = message + Environment.NewLine + Environment.NewLine + details;
        }


        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
        }
    }
}

